﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Data;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;
    using System.Windows.Forms;

    [StandardModule]
    internal sealed class ShowFormModule
    {
        public static void ShowForm(string strKey)
        {
            try
            {
                ShowHelpsModule.ShowHelps(strKey);
                string str = strKey.Trim();
                switch (str)
                {
                    
                    case "BC-HD01":
                        MyProject.Forms.Frm_BCTinhHinhSuDungHoaDon.Tag = strKey;
                        MyProject.Forms.Frm_BCTinhHinhSuDungHoaDon.ShowDialog();
                        return;

                    case "BC-HD02":
                        if (MyProject.Forms.Frm_ThongTinThemPhatHanhHoaDon.ShowDialog() == DialogResult.OK)
                        {
                            MyProject.Forms.Frm_BCPhatHanhHoaDon.Tag = strKey;
                            MyProject.Forms.Frm_BCPhatHanhHoaDon.ShowDialog();
                        }
                        return;

                    case "TK-0023":
                        MyProject.Forms.Frm_DanhSachTaiSanCoDinh.Tag = strKey;
                        MyProject.Forms.Frm_DanhSachTaiSanCoDinh.ShowDialog();
                        return;

                    case "HD-0001":
                        MyProject.Forms.Frm_HopDongMua.Tag = strKey;
                        MyProject.Forms.Frm_HopDongMua.Dispose();
                        MyProject.Forms.Frm_HopDongMua.ShowDialog();
                        return;

                    case "HD-0002":
                        MyProject.Forms.Frm_HopDongBan.Tag = strKey;
                        MyProject.Forms.Frm_HopDongBan.Dispose();
                        MyProject.Forms.Frm_HopDongBan.ShowDialog();
                        return;

                    case "BC-BH30":
                        MyProject.Forms.Frm_RptBaoCaoKyGoiDaiLy.Tag = strKey;
                        MyProject.Forms.Frm_RptBaoCaoKyGoiDaiLy.ShowDialog();
                        return;

                    case "DM-0001":
                        MyProject.Forms.Frm_DMTaiKhoan.Tag = strKey;
                        MyProject.Forms.Frm_DMTaiKhoan.ShowDialog();
                        return;

                    case "DM-0051":
                        MyProject.Forms.Frm_DMNganhHang.Tag = strKey;
                        MyProject.Forms.Frm_DMNganhHang.ShowDialog();
                        return;

                    case "DM-0002":
                        MyProject.Forms.Frm_DMNhomHangHoa.Tag = strKey;
                        MyProject.Forms.Frm_DMNhomHangHoa.ShowDialog();
                        return;

                    case "DM-0003":
                        MyProject.Forms.Frm_DMHangHoa.Tag = strKey;
                        MyProject.Forms.Frm_DMHangHoa.ShowDialog();
                        return;

                    case "DM-0004":
                        MyProject.Forms.Frm_DMKho.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMKho.ShowDialog();
                        return;

                    case "DM-0005":
                        MyProject.Forms.Frm_DMNhaCungCap.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMNhaCungCap.ShowDialog();
                        return;

                    case "DM-0006":
                        MyProject.Forms.Frm_DMKhachHang.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMKhachHang.ShowDialog();
                        return;

                    case "DM-0007":
                        MyProject.Forms.Frm_DMNhanVien.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMNhanVien.ShowDialog();
                        return;

                    case "DM-0008":
                        MyProject.Forms.Frm_DMNganHang.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMNganHang.ShowDialog();
                        return;

                    case "DM-0009":
                        MyProject.Forms.Frm_DMQuocGia.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMQuocGia.ShowDialog();
                        return;

                    case "DM-0010":
                        MyProject.Forms.Frm_DMKhuVuc.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMKhuVuc.ShowDialog();
                        return;

                    case "DM-0011":
                        MyProject.Forms.Frm_DMLoaiHoaDon.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMLoaiHoaDon.ShowDialog();
                        return;

                    case "DM-0012":
                        MyProject.Forms.Frm_DMPhuongThucThanhToan.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMPhuongThucThanhToan.ShowDialog();
                        return;

                    case "DM-0013":
                        MyProject.Forms.Frm_DMLoaiTien.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMLoaiTien.ShowDialog();
                        return;

                    case "DM-0014":
                        MyProject.Forms.Frm_DMDonViBoPhan.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMDonViBoPhan.ShowDialog();
                        return;

                    case "DM-0015":
                        MyProject.Forms.Frm_DMSanPhamCongViec.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMSanPhamCongViec.ShowDialog();
                        return;

                    case "DM-0016":
                        MyProject.Forms.Frm_DMHopDong.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMHopDong.ShowDialog();
                        return;

                    case "DM-0017":
                        MyProject.Forms.Frm_DMChiPhi.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMChiPhi.ShowDialog();
                        return;

                    case "DM-0020":
                        MyProject.Forms.Frm_DMDonViTinh.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMDonViTinh.ShowDialog();
                        return;

                    case "DM-0021":
                        MyProject.Forms.Frm_DMHangSanXuat.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMHangSanXuat.ShowDialog();
                        return;

                    case "DM-0022":
                        MyProject.Forms.Frm_DMLoaiKhachHang.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMLoaiKhachHang.ShowDialog();
                        return;

                    case "DM-0023":
                        MyProject.Forms.Frm_DMLoaiGia.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMLoaiGia.ShowDialog();
                        return;

                    case "DM-0024":
                        MyProject.Forms.Frm_DMLoaiTaiSan.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMLoaiTaiSan.ShowDialog();
                        return;

                    case "DM-0025":
                        MyProject.Forms.Frm_DMViTri.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMViTri.ShowDialog();
                        return;

                    case "DM-0026":
                        MyProject.Forms.Frm_DMPhuTungTaiSan.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMPhuTungTaiSan.ShowDialog();
                        return;

                    case "DM-0027":
                        MyProject.Forms.Frm_DMKhoanMucChiPhi.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMKhoanMucChiPhi.ShowDialog();
                        return;

                    case "DM-0028":
                        MyProject.Forms.Frm_DMLyDoTangGiamTaiSan.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMLyDoTangGiamTaiSan.ShowDialog();
                        return;

                    case "DM-0029":
                        MyProject.Forms.Frm_DMLoaiNhapXuat.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMLoaiNhapXuat.ShowDialog();
                        return;

                    case "DM-0030":
                        MyProject.Forms.Frm_DMPhuongThucVanChuyen.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMPhuongThucVanChuyen.ShowDialog();
                        return;

                    case "DM-0031":
                        MyProject.Forms.Frm_DMDieuKhoanBaoGia.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMDieuKhoanBaoGia.ShowDialog();
                        return;

                    case "DM-0032":
                        MyProject.Forms.Frm_DMNganhKinhDoanh.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMNganhKinhDoanh.ShowDialog();
                        return;

                    case "DM-0033":
                        MyProject.Forms.Frm_DMTinhThanh.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMTinhThanh.ShowDialog();
                        return;

                    case "DM-0034":
                        MyProject.Forms.Frm_DMThongSoHangHoa.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMThongSoHangHoa.ShowDialog();
                        return;

                    case "DM-0050":
                        MyProject.Forms.Frm_DinhNghiaPhuTung.ShowDialog();
                        return;

                    case "DM-0052":
                        MyProject.Forms.Frm_DMPhuongThucTamUng.Tag = strKey.Trim();
                        MyProject.Forms.Frm_DMPhuongThucTamUng.ShowDialog();
                        return;

                    case "ST-0000":
                        MyProject.Forms.Frm_NhapKhoNoiBo.Show();
                        return;

                    case "ST-0001":
                        MyProject.Forms.Frm_XuatKho.Show();
                        return;

                    case "ST-0002":
                        MyProject.Forms.Frm_XuatChuyen.Show();
                        return;

                    case "ST-0003":
                        MyProject.Forms.Frm_CapNhatGiaVonXuatKho.ShowDialog();
                        return;

                    case "ST-0004":
                        MyProject.Forms.Frm_KiemKeHangTonKho.Show();
                        return;

                    case "ST-0005":
                        if (((modGeneral.H_LOAIGIA != "A") | modGeneral.H_THEODOISERI) | modGeneral.H_THEODOISOLOHANG)
                        {
                            MyProject.Forms.Frm_CapNhatSoDuDauKyHangHoaTheoLo.ShowDialog();
                        }
                        else
                        {
                            MyProject.Forms.Frm_SoDuDauKyHangHoa.ShowDialog();
                        }
                        return;

                    case "BH-0000":
                        MyProject.Forms.Frm_XuatBan.Show();
                        return;

                    case "BH-0001":
                        MyProject.Forms.Frm_CapNhatGiaBan.ShowDialog();
                        return;

                    case "BH-0005":
                        MyProject.Forms.Frm_PhaiThu.Show();
                        return;

                    case "BH-0006":
                        MyProject.Forms.Frm_KhachHangThanhToan.Show();
                        return;

                    case "BH-0007":
                        MyProject.Forms.Frm_TinhHoaHong.Show();
                        return;

                    case "BH-0003":
                        MyProject.Forms.Frm_SaleOrder.Show();
                        return;

                    case "BH-0004":
                        MyProject.Forms.Frm_KhachHangTraHang.Show();
                        return;

                    case "BH-0002":
                        MyProject.Forms.Frm_BaoGia.Show();
                        return;

                    case "BH-0008":
                        MyProject.Forms.Frm_TruyVanHangTonKho.Show();
                        return;

                    case "BH-0009":
                        MyProject.Forms.Frm_XacNhanThanhToanHoaDon.Show();
                        return;

                    case "BH-0011":
                        MyProject.Forms.Frm_CanTruCongNo.Show();
                        return;

                    case "BC-BH10":
                        MyProject.Forms.Frm_RptBangKeHoaHong.ShowDialog();
                        return;

                    case "BH-0013":
                        if (modGeneral.H_ISCLIENT == 0)
                        {
                            MyProject.Forms.Frm_NhanDuLieu.ShowDialog();
                        }
                        else
                        {
                            MyProject.Forms.Frm_NhanDuLieuTuChiNhanh.ShowDialog();
                        }
                        return;

                    case "BH-0014":
                        MyProject.Forms.Frm_ChuyenDuLieuDanhMucSangChiNhanh.ShowDialog();
                        return;

                    case "BH-0012":
                        MyProject.Forms.Frm_DinhNghiaChiNhanh.ShowDialog();
                        MyProject.Forms.Frm_DinhNghiaChiNhanh.BringToFront();
                        return;
                }
                switch (str)
                {
                    case "BH-0011":
                        MyProject.Forms.Frm_HoaDonChiNhanh.ShowDialog();
                        MyProject.Forms.Frm_HoaDonChiNhanh.BringToFront();
                        return;

                    case "BH-0017":
                        MyProject.Forms.Frm_PhieuGiaoHang.Tag = strKey;
                        MyProject.Forms.Frm_PhieuGiaoHang.ShowDialog();
                        return;

                    case "BC-BH03":
                        MyProject.Forms.Frm_RptHoaDonBanHangCoChietKhau.ShowDialog();
                        return;

                    case "BC-BH06":
                        MyProject.Forms.Frm_RptDoanhThuTheoLoaiKH.ShowDialog();
                        return;

                    case "BC-BH08":
                        MyProject.Forms.Frm_RptHoaDonDenHanThanhToan.ShowDialog();
                        return;

                    case "BC-BH14":
                        MyProject.Forms.Frm_RptDoanhThuTheoMatHangChiTiet.ShowDialog();
                        return;

                    case "BH-0002":
                        MyProject.Forms.Frm_BaoGia.Show();
                        return;

                    case "BH-0010":
                        MyProject.Forms.Frm_HopDongMuaBan.Show();
                        return;

                    case "BH-0015":
                        MyProject.Forms.Frm_HoaDonBanDichVu.Show();
                        return;

                    case "KH-BC02":
                        MyProject.Forms.Frm_TongHopHangTonKho.Show();
                        return;

                    case "BC-BH13":
                        MyProject.Forms.Frm_BaoCaoDoanhThuTheoNhanVien.Show();
                        return;

                    case "NV-0001":
                        MyProject.Forms.Frm_PhieuThuTien.Show();
                        return;

                    case "NV-0002":
                        MyProject.Forms.Frm_PhieuChi.Show();
                        return;

                    case "NV-0003":
                        MyProject.Forms.Frm_BaoCoNganHang.Show();
                        return;

                    case "NV-0004":
                        MyProject.Forms.Frm_BaoNoNganHang.Show();
                        return;

                    case "NV-0005":
                        MyProject.Forms.Frm_TongHop.Show();
                        return;

                    case "NV-0010":
                        MyProject.Forms.Frm_PhieuThuTien.Show();
                        return;

                    case "TH-0009":
                        MyProject.Forms.Frm_DinhNghiaKetChuyenChiPhiTraTruoc.ShowDialog();
                        return;

                    case "MH-0000":
                        MyProject.Forms.Frm_YeuCauBaoGia.Show();
                        return;

                    case "MH-0001":
                        MyProject.Forms.Frm_DonDatHangMua.Show();
                        return;

                    case "MH-0003":
                        MyProject.Forms.Frm_ChiPhiMuaHang.ShowDialog();
                        return;

                    case "BC-MH03":
                        MyProject.Forms.Frm_HangTrenDuongVe.Show();
                        return;

                    case "MH-0004":
                        MyProject.Forms.Frm_TraHangNhaCungCap.Show();
                        return;

                    case "NV-0006":
                        MyProject.Forms.Frm_NhapKho.Show();
                        return;

                    case "NV-0007":
                        MyProject.Forms.Frm_NhapKhau.Show();
                        return;

                    case "MH-0008":
                        MyProject.Forms.Frm_ThanhToanNhaCungCap.Show();
                        return;

                    case "MH-0009":
                        MyProject.Forms.Frm_PhaiTra.Show();
                        return;

                    case "MH-0011":
                        MyProject.Forms.Frm_CapNhatGiaMua.Show();
                        return;

                    case "MH-0012":
                        MyProject.Forms.Frm_XacNhanThanhToanDauVao.Show();
                        MyProject.Forms.Frm_XacNhanThanhToanDauVao.BringToFront();
                        return;

                    case "MH-0013":
                        MyProject.Forms.Frm_HoaDonMuaDichVu.Show();
                        return;

                    case "BC-0014":
                        MyProject.Forms.Frm_RptBangKeHoaDonNoThanhToan.ShowDialog();
                        return;

                    case "BC-MH01":
                        MyProject.Forms.Frm_RptBangKeTraHangNhaCungCap.ShowDialog();
                        return;

                    case "BC-MH02":
                        MyProject.Forms.Frm_RptChiPhiMuaHang.ShowDialog();
                        return;

                    case "BC-0011":
                        MyProject.Forms.Frm_RptThuyetMinhChiPhi.ShowDialog();
                        return;

                    case "BC-BH12":
                        MyProject.Forms.Frm_RptBangGiaHangHoa.ShowDialog();
                        return;

                    case "NV-0012":
                        MyProject.Forms.Frm_TaiSan.Show();
                        return;

                    case "NV-0013":
                        MyProject.Forms.Frm_TangTaiSan.Show();
                        return;

                    case "NV-0015":
                        MyProject.Forms.Frm_GhiGiamTaiSan.Show();
                        return;

                    case "NV-0014":
                        MyProject.Forms.Frm_KhauHaoTaiSan.Show();
                        return;

                    case "BC-0018":
                        MyProject.Forms.Frm_DanhSachTaiSanCoDinh.ShowDialog();
                        return;

                    case "BC-0012":
                        MyProject.Forms.Frm_RptBangTinhKhauHao.ShowDialog();
                        return;

                    case "TH-0006":
                        MyProject.Forms.Frm_SoDuDauKy.ShowDialog();
                        return;

                    case "TH-0007":
                        MyProject.Forms.Frm_KetChuyenChiPhi.ShowDialog();
                        return;

                    case "TH-0008":
                        MyProject.Forms.Frm_KetChuyenSoDu.ShowDialog();
                        return;

                    case "TH-0010":
                        MyProject.Forms.Frm_PhanBoChiPhiTraTruoc.ShowDialog();
                        return;

                    case "TH-0011":
                        MyProject.Forms.Frm_SanPhamDoDang.ShowDialog();
                        return;

                    case "TH-0015":
                        MyProject.Forms.Frm_XacDinhSanPhanHoanThanh.ShowDialog();
                        return;

                    case "TH-0016":
                        MyProject.Forms.Frm_DanhSachSanPhamDoDang.ShowDialog();
                        return;

                    case "TH-0017":
                        MyProject.Forms.Frm_GetDataFromLocalSystem.ShowDialog();
                        return;

                    case "TH-0018":
                        MyProject.Forms.Frm_TamUng.ShowDialog();
                        return;

                    case "TH-0019":
                        MyProject.Forms.Frm_Matching.ShowDialog();
                        return;

                    case "TH-0020":
                        MyProject.Forms.Frm_KetChuyenCacKhoanGiamTruVaThue.ShowDialog();
                        return;

                    case "MH-0010":
                        MyProject.Forms.Frm_NopThueNhapKhau.Show();
                        return;

                    case "BC-TH01":
                        MyProject.Forms.Frm_RptSoCaiTaiKhoan.ShowDialog();
                        return;

                    case "BC-0001":
                        MyProject.Forms.Frm_RptQuyTienMat.ShowDialog();
                        return;

                    case "BC-0002":
                        MyProject.Forms.Frm_RptQuyTienGoiNganHang.ShowDialog();
                        return;

                    case "BC-0003":
                        MyProject.Forms.Frm_RptBangKePhieuThu.ShowDialog();
                        return;

                    case "BC-0004":
                        MyProject.Forms.Frm_RptBangKePhieuChi.ShowDialog();
                        return;

                    case "BC-0005":
                        MyProject.Forms.Frm_CongNoPhaiThu.ShowDialog();
                        return;

                    case "BC-0006":
                        MyProject.Forms.Frm_RptCongNoPhaiTra.ShowDialog();
                        return;

                    case "BC-0007":
                        MyProject.Forms.Frm_SoNhatKyChung.ShowDialog();
                        return;

                    case "BC-0008":
                        MyProject.Forms.Frm_RptBangCanDoiSoPhatSinh.ShowDialog();
                        return;

                    case "BC-0009":
                        MyProject.Forms.Frm_RptSoCaiChiTietTaiKhoan.ShowDialog();
                        return;

                    case "BC-0010":
                    //case "BC-0011":
                    //case "BC-0012":
                     //   return;

                    case "BC-0013":
                        MyProject.Forms.Frm_RptBangKePhieuNhapKho.ShowDialog();
                        return;
                }
                switch (str)
                {
                    case "BC-0014":
                    case "BC-0017":
                    case "BC-0018":
                        return;

                    case "BC-BH01":
                        MyProject.Forms.Frm_RptHoaDonBanHang.ShowDialog();
                        return;

                    case "BC-BH02":
                        MyProject.Forms.Frm_RptHoaDonChuaThanhToan.ShowDialog();
                        return;

                    case "BC-0019":
                        MyProject.Forms.Frm_RptBangKePhieuNhapKhau.ShowDialog();
                        return;

                    case "BC-0020":
                        MyProject.Forms.Frm_RptThueNhapKhauDenHanNop.ShowDialog();
                        return;

                    case "BC-BH04":
                        MyProject.Forms.Frm_RptDoanhThuTheoSanPham.ShowDialog();
                        return;

                    case "BC-0022":
                        MyProject.Forms.Frm_RptNhapXuatTonKho.ShowDialog();
                        return;

                    case "BC-0023":
                        MyProject.Forms.Frm_TheKhoVatTu.ShowDialog();
                        return;

                    case "BC-0024":
                        MyProject.Forms.Frm_RptBangKePhieuXuatKho.ShowDialog();
                        return;

                    case "BC-0025":
                        MyProject.Forms.Frm_RptXuatChuyenKhoList.ShowDialog();
                        return;

                    case "BC-0026":
                        MyProject.Forms.Frm_RptBangCanDoiTaiKhoan.ShowDialog();
                        return;

                    case "BC-0027":
                        MyProject.Forms.Frm_RptLuuChuyenTien.ShowDialog();
                        return;

                    case "BC-0028":
                        MyProject.Forms.Frm_RptKetQuaHoatDongKinhDoanh.ShowDialog();
                        return;

                    case "BC-0029":
                        MyProject.Forms.Frm_RptHoaDonMuaVao.ShowDialog();
                        return;

                    case "BC-0030":
                        MyProject.Forms.Frm_RptHoaDonBanRa.ShowDialog();
                        return;

                    case "BC-BH09":
                        MyProject.Forms.Frm_RptKhachHangNoVuotDinhMuc.ShowDialog();
                        return;

                    case "BC-BH07":
                        MyProject.Forms.Frm_RptDoanhThuTheoKhuVuc.ShowDialog();
                        return;

                    case "BC-BH05":
                        MyProject.Forms.Frm_RptBangKeHangHoaTraLai.ShowDialog();
                        return;

                    case "BC-BH20":
                        MyProject.Forms.Frm_RptHoaDonBanDichVu.ShowDialog();
                        return;

                    case "BC-0031":
                        MyProject.Forms.Frm_TongHopThuTienBanHang.ShowDialog();
                        return;
                }
                switch (str)
                {
                    case "BC-0031":
                        MyProject.Forms.Frm_RptBangKeHangHoaTonKho.ShowDialog();
                        return;

                    case "BC-0032":
                        MyProject.Forms.Frm_RptBangKeHangHoaTonDuoiDinhMuc.ShowDialog();
                        return;

                    case "BC-KT01":
                        MyProject.Forms.Frm_RptDoiChieuCongNoPhaiThu.ShowDialog();
                        return;

                    case "BC-0033":
                        MyProject.Forms.Frm_DKHangHoa.ShowDialog();
                        return;

                    case "BC-0034":
                        MyProject.Forms.Frm_DKKhachHang.ShowDialog();
                        return;

                    case "BC-0035":
                        LVYModule.ShowWarning("Chưa thực hiện");
                        return;

                    case "BC-KT02":
                        MyProject.Forms.Frm_RptDoiChieuCongNoPhaiTra.ShowDialog();
                        return;

                    case "BC-BH11":
                        MyProject.Forms.Frm_RptDoanhThuTheoNgay.ShowDialog();
                        return;

                    case "KH-BC01":
                        MyProject.Forms.Frm_RptHeHanSuDung.ShowDialog();
                        return;

                    case "BC-MH04":
                        MyProject.Forms.Frm_HoaDonNhapKhauNoThanhToan.ShowDialog();
                        return;

                    case "BC-MH05":
                        MyProject.Forms.Frm_BangKeHoaDonMuaDichVu.ShowDialog();
                        return;

                    case "BC-MH06":
                        MyProject.Forms.Frm_TongHopThanhToanTienHang.ShowDialog();
                        return;

                    case "TK-0001":
                        MyProject.Forms.Frm_PhieuThuList.Show();
                        return;

                    case "TK-0002":
                        MyProject.Forms.Frm_PhieuChiList.Show();
                        return;

                    case "TK-0003":
                        MyProject.Forms.Frm_BaoCoNganHangList.Show();
                        return;

                    case "TK-0004":
                        MyProject.Forms.Frm_BaoNoNganHangList.Show();
                        return;

                    case "TK-0005":
                        MyProject.Forms.Frm_ChungTuTongHopList.Show();
                        return;

                    case "TK-0006":
                        MyProject.Forms.Frm_NhapKhoList.Show();
                        return;

                    case "TK-0007":
                        MyProject.Forms.Frm_NhapKhauList.Show();
                        return;

                    case "TK-0008":
                        MyProject.Forms.Frm_PhaiTraList.Show();
                        return;

                    case "TK-0014":
                        MyProject.Forms.Frm_ChiPhiMuaHangList.Show();
                        return;

                    case "TK-0015":
                        MyProject.Forms.Frm_DonDatHangMuaList.Show();
                        return;

                    case "TK-0016":
                        MyProject.Forms.Frm_DonDatHangBanList.Show();
                        return;

                    case "TK-0017":
                        MyProject.Forms.Frm_ThuTienBanHangList.Show();
                        return;

                    case "TK-0018":
                        MyProject.Forms.Frm_ThanhToanNhaCungCapList.Show();
                        return;

                    case "TK-0019":
                        MyProject.Forms.Frm_NhapKhoNoiBoList.Show();
                        return;

                    case "TK-0020":
                        MyProject.Forms.Frm_BaoGiaList.Show();
                        return;

                    case "TK-0021":
                        MyProject.Forms.Frm_KhachHangTraHangList.Show();
                        return;

                    case "TK-0022":
                        MyProject.Forms.Frm_TraHangNhaCungCapList.Show();
                        return;

                    case "TK-0009":
                        MyProject.Forms.Frm_XuatBanList.Show();
                        return;

                    case "TK-0010":
                        MyProject.Forms.Frm_PhaiThuList.Show();
                        return;

                    case "TK-0011":
                        MyProject.Forms.Frm_XuatKhoList.Show();
                        return;

                    case "TK-0012":
                        MyProject.Forms.Frm_XuatChuyenKhoList.Show();
                        return;

                    case "TK-0013":
                        MyProject.Forms.Frm_HoaHongList.Show();
                        return;

                    case "TK-0025":
                        MyProject.Forms.Frm_PhieuGiaoHangList.Show();
                        return;

                    case "TK-0024":
                        MyProject.Forms.Frm_HoaDonBanDichVuList.Show();
                        return;

                    case "TK-0026":
                        MyProject.Forms.Frm_HoaDonMuaDichVuList.Show();
                        return;

                    case "HT-0001":
                        MyProject.Forms.Frm_DanhSachNguoiDung.ShowDialog();
                        return;

                    case "HT-0002":
                        MyProject.Forms.Frm_DanhSachNguoiDung.ShowDialog();
                        return;

                    case "HT-0003":
                        MyProject.Forms.Frm_ThongTinCongTy.ShowDialog();
                        return;

                    case "HT-0004":
                        return;

                    case "HT-0005":
                        MyProject.Forms.Frm_KetNoiCSDL.ShowDialog();
                        return;

                    case "HT-0006":
                        MyProject.Forms.Frm_GiaTriMacDinh.ShowDialog();
                        return;

                    case "HT-0007":
                        MyProject.Forms.Frm_HinhKyTenDongDau.ShowDialog();
                        return;

                    case "TV-BH10":
                        MyProject.Forms.Frm_TruyVanBanHang.Show();
                        return;

                    case "SC-0001":
                        MyProject.Forms.Frm_TiepNhanThietBi.Show();
                        return;

                    case "SC-0002":
                        MyProject.Forms.Frm_KiemTraThietBi.Show();
                        return;

                    case "SC-0005":
                        MyProject.Forms.Frm_DMHangMucSuaChua.Show();
                        return;

                    case "SC-0004":
                        MyProject.Forms.Frm_BanGiaoSuaChua.Show();
                        return;

                    case "SC-BC01":
                        MyProject.Forms.Frm_RptBangKeThietBiSuaChua.ShowDialog();
                        return;

                    case "BC-BH15":
                        MyProject.Forms.Frm_RptDoanhThuChiTiet.ShowDialog();
                        return;

                    case "BC-BH16":
                        MyProject.Forms.Frm_RptDoanhThuTongHop.ShowDialog();
                        return;

                    case "BC-BH17":
                        MyProject.Forms.Frm_DanhSachHoaDonHuy.ShowDialog();
                        return;

                    case "BC-BH18":
                        MyProject.Forms.Frm_RptDoanhThuTheoKhachHang.ShowDialog();
                        return;

                    case "KH-BC03":
                        MyProject.Forms.Frm_TraCuuQuaTrinhNhapXuat.ShowDialog();
                        return;

                    case "SS-0001":
                        MyProject.Forms.Frm_RptSoNhatKyThuTien.ShowDialog();
                        return;

                    case "SS-0002":
                        MyProject.Forms.Frm_RptSoNhatKyChiTien.ShowDialog();
                        return;

                    case "BC-KT05":
                        MyProject.Forms.Frm_RptChiTietCongNo.ShowDialog();
                        return;

                    case "BC-KT06":
                        MyProject.Forms.Frm_RptBangKeDoanhThuChiPHi.ShowDialog();
                        return;

                    case "BC-0100":
                        MyProject.Forms.Frm_RptSoNhatKyMuaHang.ShowDialog();
                        return;

                    case "BC-0101":
                        MyProject.Forms.Frm_RptSoNhatKyBanHang.ShowDialog();
                        return;

                    case "TKGT":
                        MyProject.Forms.Frm_TangTaiSanList.ShowDialog();
                        return;

                    case "TKGG":
                        MyProject.Forms.Frm_GhiGiamTaiSanList.ShowDialog();
                        break;

                    case "DM-9999":
                        MyProject.Forms.Frm_KiemTraDuLieu.ShowDialog();
                        break;
                    case "NDC-081":
                        MyProject.Forms.Frm_Test.Tag = strKey;
                        MyProject.Forms.Frm_Test.ShowDialog();
                        return;
                    case "NDC-082":
                       // MyProject.Forms.Frm_00TestParentChild.Tag = strKey;
                       // MyProject.Forms.Frm_00TestParentChild.ShowDialog();
                        MyProject.Forms.Frm_DMDTTHCPList.Show();
                        return;
                }
                switch(str)
                {
                    //case "NDC-081":
                    //    MyProject.Forms.Frm_Test.Tag = strKey;
                    //    MyProject.Forms.Frm_Test.ShowDialog();
                    //    return;
                }
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                MessageBox.Show(exception1.ToString());
                ProjectData.ClearProjectError();
            }
        }

        public static string[] ShowPopDropDownBySource(object objCtr, DataTable pDataSource, int nNumRow, int nColValue, string strValue, string[] nColsNumber = null, string strTitle = "")
        {
            PopupDropDown down = new PopupDropDown(RuntimeHelpers.GetObjectValue(objCtr)) {
                ShowTitle = 0
            };
            if (strTitle.Trim() != "")
            {
                string[] strArray = strTitle.Split(new char[] { '|' });
                down.Title = strArray;
            }
            down.ColsNumber = nColsNumber;
            down.DataSource = pDataSource;
            down.ColValue = nColValue;
            down.Value = strValue;
            down.MaxRow = 10;
            down.ShowDialog();
            return down.ReturnData;
        }
    }
}

